﻿using Unity.Mathematics;

namespace Game.FlowField.Input
{
    public class RemoveUnitOperation : OperationBase<RemoveUnitOperation>
    {
        public int Index { get; private set; }

        public int2 Index2D { get; private set; }

        public int BrushSize { get; private set; }

        public static RemoveUnitOperation Get(int index, int2 index2D, int brushSize)
        {
            if (!ObjectPool<RemoveUnitOperation>.TryGet(out var result))
            {
                result = new RemoveUnitOperation();
            }

            result.Index = index;
            result.Index2D = index2D;
            result.BrushSize = brushSize;

            return result;
        }
    }
}